﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _14策略模式
{
    public class Context
    {
        private Strategy m_st;    //抽象算法类引用
        //public Context(Strategy st)
        //{
        //    m_st = st;
        //}
        public Strategy St { get=> m_st; set=>m_st=value; }

        public void ContextAlgorithm()
        {
            m_st.AlgorithmInterface();  //对抽象编程，不对具体编程
        }
    }
}
